home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d2 / pwrbt14e.arc / PBCLONE.PWR < prev    next >
Text File  |  1990-12-01  |  4KB  |  109 lines

  1. Variable      FColor,1
  2. Variable      BColor,1
  3. Variable      CAttr,1
  4. Variable      Use2Flop,1,"Y"
  5. Variable      UseHD,1,"N"
  6. Variable      Source,79,"A:"
  7. Variable      Target,79,"B:"
  8. Variable      WorkDisk,79
  9. Variable      DelWork,1,"N"
  10. Variable      Work,79
  11. Variable      Msg,80
  12. Variable      InChar,1
  13. ?Color        FColor,BColor,CAttr       ;save curr colors
  14. Clear                                   ;clear the screen
  15. WriteLine     "This PowerBatch program will produce an evaluation copy of PowerBatch for you"
  16. WriteLine     "to give to a friend or associate. If you have 2 floppy disk drives, both will"
  17. WriteLine     "be utilized to make the copy. If you have only one drive, enter A for both"
  18. WriteLine     "source and destination and the files will be copied to your hard disk and from"
  19. WriteLine     "your hard disk to a new disk in your floppy drive."
  20. WriteLine     ""
  21. Write         "Enter the source drive letter containing the PowerBatch files "
  22. ReadUpKey     Source
  23. WriteLine     ""
  24. Write         "Enter the source directory name "
  25. ReadStr       Work
  26. WriteLine     ""
  27. Write         "Enter the target drive letter to receive the PowerBatch files "
  28. ReadUpKey     Target
  29. WriteLine     ""
  30. Compare       Source,Target,2Drives,2Drives
  31. Concat        Source,":"              ;ie A:
  32. Concat        Source,Work             ;A:\Work...
  33. Write         "Enter the Drive letter to be used as a work drive "
  34. ReadUpKey     WorkDisk
  35. WriteLine     ""
  36. Concat        WorkDisk,":\{PB$WRK}"   ;use this as a work dir
  37. ?DirExist     WorkDisk,WorkExist      ;does it exist
  38. SetVar        DelWork,"Y"             ;delete it when were done
  39. Write         "Making directory "
  40. WriteLine     WorkDisk
  41. MKDIR         WorkDisk                ;create the work dir
  42.  
  43. Label         WorkExist
  44. Concat        Work,Source," "         ;cmd line parms are delimited by spaces
  45. Concat        Work,WorkDisk
  46. WriteLine     "Copy PowerBatch files to work directory"
  47. MoveSub       Work                    ;execute subroutine
  48. Compare       ErrorLevel,0,Finis
  49. Concat        Msg,"Remove PowerBatch disk from ",Source
  50. Concat        Msg," and replace with blank disk. Press Y when ready."
  51. ReadYN        Msg,InChar
  52. WriteLine     ""
  53. Concat        Work,WorkDisk," "      ;build cmd line for copy
  54. Concat        Work,Target
  55. Concat        Work,":"
  56. MoveSub       Work                    ;now copy from work disk to floppy
  57. Compare       ErrorLevel,0,Finis
  58. WriteLine     ""
  59. Write         "The disk in "
  60. Write         Target
  61. WriteLine     " is now a copy of PowerBatch."
  62. WriteLine     "You may remove and label the disk while I clean up the work disk."
  63. WriteLine     ""
  64. GoTo          CopyExit
  65.  
  66. Label         2Drives
  67. Concat        Source,":"              ;add : to drive letter
  68. Concat        Target,":"
  69. Concat        Source,Work             ;add the dir to drive on source
  70. Concat        Work,Source," "         ;build entire command in work
  71. Concat        Work,Target
  72. MoveSub       Work
  73. Compare       ErrorLevel,0,Finis
  74. Write         "The disk in "
  75. Write         Target
  76. WriteLine     " is now a copy of PowerBatch."
  77. WriteLine     ""
  78. GoTo          Finis
  79.  
  80. Label         CopyExit
  81. WriteLine     "Delete files from work disk"
  82. Concat        Work,WorkDisk,"\README.1ST"
  83. Erase         Work
  84. Concat        Work,WorkDisk,"\PBINSTAL.EXE"
  85. Erase         Work
  86. Concat        Work,WorkDisk,"\POWERMAK.EXE"
  87. Erase         Work
  88. Concat        Work,WorkDisk,"\SMLMODEL.MDL"
  89. Erase         Work
  90. Concat        Work,WorkDisk,"\POWERBAT.DOC"
  91. Erase         Work
  92. Concat        Work,WorkDisk,"\DOSEX1.BAT"
  93. Erase         Work
  94. Concat        Work,WorkDisk,"\*.PWR"
  95. Erase         Work
  96. Concat        Work,WorkDisk,"\DELETEPB.EXE"
  97. Erase         Work
  98. Concat        Work,WorkDisk,"\*.FRM"
  99. Erase         Work
  100. Concat        Work,WorkDisk,"\VENDOR.DOC"
  101. Erase         Work
  102. Concat        Work,WorkDisk,"\SYSOP.DOC"
  103. Erase         Work
  104. Compare       DelWork,"Y",Finis,Finis
  105. WriteLine     "Remove work directory"
  106. RMDIR         WorkDisk
  107.  
  108. Label         Finis
  109.